Assigned October 27, 2003
Due: November 3, 2003
list2.h: The header file
for the List class. Actually, you don't have to write much of this file.
Just start with the version provided and add your name and other information
at the top. The file contains definition of two classes: Node
and List. The Node
class has been completely defined and its member functions have been implemented
inline. list2.cpp: The implementation
file for List class. You will write all of this file, which will have
the implementations of all the List's member functions.
listtest.cpp: A simple interactive test program. listexam.cpp: A non-interactive test program that will
be used to grade the correctness of your List class. The previous assignment (2) asked you to use a fixed array to implement the
List ADT discussed in the lectures. Such an implementation has the limitation
on the number of elements that can be stored in the List. In this assignment,
the List ADT will be implemented using a singly linked structure. This will
not have the size limitation. Internally, memory of linked list nodes will be
allocated, the data will be stored in the node and the new node will be linked
into the singly linked structure using the insert or attach
member functions. However, the List ADT stays the same; the internal implementation
must not have an impact on the behavior of the List ADT.
As always, do your work in small pieces. For example, your first version of the List could have only a constructor, start, insert, advance, and current. Other member functions can be stubs.
Use the interactive test program and the debugger to track down errors in your implementation. If you have an error, do not start making changes until you have identified the cause of the error.
We have told you many times about these measures but we have seen that you are not following these measures carefully.
If you will not follow them you will loose marks. So read them carefully:
Your assignment must be complete in every aspect.
There will be no compile time errors in your assignment. If this is the case then you will not be given any marks.
IMPORTANT: No assignment will be received via email. Do not give excuses if you unable to submit your assignment in time.
Package your assignment in a proper manner.
Make a project file. The assignment without project file will not be accepted.
Add all files in that project
Implement the required functions/functionality
Zip the whole folder (Zip file must contain Project file, program files, do not include exe file)
Please make sure that you must perform all these measures before sending/uploading your assignment. You will not be given any marks if you don't take care these measures.